<?php
class Dig_Model_Person extends Dig_Model_Abstract
{
    public $id;
    public $first_name;
    public $last_name;
    public $email;
    public $username;
    public $password;
    public $role = 'user';
    protected $_digitalusNamespace = 'user'; // default page namespace
    protected $_digitalusTable = 'people'; // the virtual table name
    public function authenticate ()
    {
        $authAdapter = new Dig_Auth_Adapter_Person($this);
        return $authAdapter->authenticate();
    }
    public static function getCurrent ()
    {
        $auth = Zend_Auth::getInstance();
        if ($auth->hasIdentity()) {
            return $auth->getIdentity();
        }
    }
    protected function _setPassword ()
    {
        return md5($this->password);
    }
}